/*
 * SHA transform algorithm, originally taken from code written by
 * Peter Gutmann, and placed in the public domain.
 */

#ifndef __SHA1_H_
#define __SHA1_H_

#include <stdlib.h>
//typedef unsigned int __u32;

#define inline __inline

/**
 * rol32 - rotate a 32-bit value left
 * @word: value to rotate
 * @shift: bits to roll
*/
static inline __u32 rol32(__u32 word, unsigned int shift)
{
	return (word << shift) | (word >> (32 - shift));
}

extern void sha_init(__u32 *buf);
extern void sha_transform(__u32 *digest, const char *in, __u32 *W);
/* add for broncho */
extern void sha(const char* in, int len, unsigned int* hash);
extern void sha_setimei(const unsigned char* user_imei);
#endif /* __SHA1_H_ */


